[mirrors]
http://downloads.sourceforge.net/enlightenment/imlib2-1.4.8.tar.bz2

[vars]
filesize=891876
sha512=ddfd9a27edb8a27d992e2e6d911fd9330062b4c402283ecf1914d3da4f7aa39c59728ae4cbbbf73c6f875ad4aabbe43db9ec46fb54754f217eeabf66f6ef3bdf
uchkurl=https://sourceforge.net/projects/enlightenment/files/imlib2-src/

[deps]
bzip2
libxext
freetype
libpng
libjpeg
giflib

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

printf "#!/bin/sh\necho -lfreetype -I$butch_root_dir$butch_prefix/include/freetype2\n" > freetype-config
chmod +x freetype-config
export PATH="$PWD:$PATH"

CPPFLAGS=-D_GNU_SOURCE CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
